package cn.flexui.flexuiserver.config.properties;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author wanmingyu
 * @create 2024/9/15 18:00
 */
@Data
@Component
@ConfigurationProperties(prefix = "flexui.just-auth")
public class AuthProperties {

    private Google google;
    private Feishu feishu;
    private Microsoft microsoft;
    private Github github;


    @Data
    public static class Base{
        private String clientId;
        private String clientSecret;
        private String redirectUri;
    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class Google extends Base {

    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class Feishu  extends Base {
    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class Github extends Base {

    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class Microsoft  extends Base{

        private String tenantId;

    }
}
